package com.pinyoumei.service;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

@RequestMapping("/cart")
public interface CartService {

	/**
	 * 添加商品到购物车
	 * @param cartList 购物车列表
	 * @param itemId 商品ID
	 * @param num 商品数量
	 * @return
	 */
	@RequestMapping("/add")
	public String addGoodsToCartList(@RequestParam("cartListString")String cartListString,@RequestParam("itemId")Long itemId,@RequestParam("num")Integer num);
	
	/**
	 * 用户登录时购物车写入redis
	 */
	@RequestMapping("/writeCartList2Redis")
	public void writeCartList2Redis(@RequestParam("cartListString")String cartListString,@RequestParam("userId")String userId);
}
